package com.sxbbc.common.core.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.sxbbc.common.core.entity.jz.CFreezeDonateDetail;
import com.sxbbc.common.core.enums.FreezeStatusEnums;
import com.sxbbc.common.core.mapper.jz.CFreezeDonateDetailMapper;
import com.sxbbc.common.core.service.ICFreezeDonateDetailService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 用户冻结贡献值明细表 服务实现类
 * </p>
 *
 * @author leehao
 * @since 2019-07-23
 */
@Service
public class CFreezeDonateDetailServiceImpl extends ServiceImpl<CFreezeDonateDetailMapper, CFreezeDonateDetail> implements ICFreezeDonateDetailService {

    @Override
    public List<CFreezeDonateDetail> getByPayCodeAndCid(String payCode, Integer cid) {
        QueryWrapper<CFreezeDonateDetail> wrapper = new QueryWrapper<>();
        wrapper.eq("pay_code",payCode).
                eq("cid",cid).
                eq("status", FreezeStatusEnums.FREEZING.getId());
        return super.list(wrapper);
    }
}
